﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;
using AreaComunServices.Dominio;
using System.ServiceModel.Web;

namespace AreaComunServices
{
    [ServiceContract]
    public interface IAreasComunesService
    {
        [OperationContract]
        [WebInvoke(Method = "POST", UriTemplate = "AreasComunes", ResponseFormat = WebMessageFormat.Json)]
        String CrearAreaComun(AreaComun areaComunACrear);

        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "AreasComunes/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        AreaComun ObtenerAreaComun(string codigo);
        
        [OperationContract]
        [WebInvoke(Method = "PUT", UriTemplate = "AreasComunes", ResponseFormat = WebMessageFormat.Json)]
        String ModificarAreaComun(AreaComun areaComunAModificar);
        
        [OperationContract]
        [WebInvoke(Method = "DELETE", UriTemplate = "AreasComunes/{codigo}", ResponseFormat = WebMessageFormat.Json)]
        String EliminarAreaComun(string codigo);
        
        [OperationContract]
        [WebInvoke(Method = "GET", UriTemplate = "AreasComunes", ResponseFormat = WebMessageFormat.Json)]
        List<AreaComun> ListarAreasComunes();
        
    }
}